package com.tw.trips.ui.mock;

import java.util.HashSet;
import java.util.Set;

import com.tw.trips.domain.Location;
import com.tw.trips.domain.Traveller;
import com.tw.trips.domain.Trip;

public class TravellerMock {
	public Traveller getTraveller() {
		Traveller traveller = new Traveller();
		traveller.setName("Traveller Name");
		
		traveller.getTrips().addAll(getTrips());
		
		return traveller;
	}

	private Set<Trip> getTrips() {
		Set<Trip> trips = new HashSet<Trip>();
		for(int i=0;i<2;i++) {
			Trip trip = new Trip();
			trip.setSource(getLocation("Chennai"));
			trip.setDestination(getLocation("Sattur"));
//			trip.getActivities().addAll((new LocationMock().getLocation().getUpdates()));
			trips.add(trip);
		}
		return trips;
	}

	private Location getLocation(String locName) {
		Location location = new Location();
		
		location.setName(locName);
		
		return location;
	}
}
